The Tab View Component > FTabView (object) |
FTabView (object)
The methods of the Tab View component allow you to control the component at runtime. You can define new tabs, respond to user interaction with the component, and manipulate the contents of the component. You do not need to use a constructor to access the methods of the component.
The ActionScript extension for the Tab View component is _tbv.
If you append this to your component instance names, code hinting and auto-completion
will be available within the Flash authoring environment.
Component methods do not perform error checking for type, as do other native ActionScript objects and actions. Therefore, you should validate parameters before passing them to methods.
Method summary for the FTabView object
Method name |
Description |
|---|---|
Adds a tab at the end of the tab view. The component will automatically redraw to show the newly added tab. |
|
Adds a tab at the specified index. The component will automatically redraw to show the newly added tab. |
|
Adds a listener to the component, which can capture and respond to the 2 events fired by the component. The events are: onEnable and onSelect. |
|
Returns the DataProvider being used to populate the tabs within the component. |
|
Returns a Boolean value indicating whether the component is enabled (true) or not (false). When the component is not enabled, it will not respond to user interaction. Its visual state will also be grayed-out to indicate its status. |
|
Returns an Object containing data associated with the tab at the specified index. |
|
Returns a string containing the linkage id of the symbol being used to create the tab. |
|
Returns the name of the field that will be used to store the tabs' labels. This allows you to pass DataProviders directly to the component and specify which field should be used for the label name. The default value is "label". |
|
Returns the number of tabs within the component. |
|
| Returns a number indicating the index of the currently selected tab. |
|
| Returns an Object representing the currently selected item. |
|
| Returns an Object representing the currently selected item. |
|
| Removes all tabs from the component. Any data associated with the sections will be lost. |
|
| Removes the tab at the specified index. Any data associated with the tab will be lost. Any items above the remove index, will have their index reduced by 1. |
|
| This method removes the specified object from the list of Objects listening for events from the component. |
|
| Replaces the tab at the specified index with a new tab with the specified label and data. Any data associated with the previous tab will be discarded. If a string is passed in as the second argument, a new object will be created and the string will be stored in the label property. If an Object is passed in as the second object, it will be used to populate the tab label. By default, the component will look for a property on the object named "label" to determine the tab name. |
|
| This specifies the DataProvider that should be used to create and populate tabs within the component. |
|
| Specifies whether the component is enabled (true) or disabled (false). If the component is disabled, it will not accept mouse or keyboard interaction from the user. The component will also be grayed-out to visually indicate its state to the user. |
|
| Sets the String linkage of the item that is used for the tabs. When this method is called the Tab View will automatically redraw using the new symbol specified by the linkage id to create the tabs. This method allows you to change the symbol used as the graphics for the tabs. |
|
| Specifies the name of the field that will be used to store the tabs' labels. This allows you to pass DataProviders directly to the component and specify which field should be used for the label name. The default value is "label". |
|
| Specifies the index of the tab that should be selected within the component. If the specified index does not exist, the method call will be ignored. |
|
| Sets the width of the component in pixels. This also defines the size of each tab. The size of the tabs will be the width divided by the number of tabs. |
|
| This methods sorts the component by the field specified in the first parameter. If "DESC" is passed in as the second parameter, the component will be sorted in descending order. Otherwise, the component sorts in ascending order. |